Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:exof support on baklava #106

Merged
merged 4 commits into from
Sep 22, 2023
Merged

feat:exof support on baklava #106

merged 4 commits into from
Sep 22, 2023

Conversation

denviljclarke
Copy link
Contributor

@denviljclarke denviljclarke commented Sep 22, 2023

Description

This PR adds eXOF support for baklava to allow testing using the UI.

There's also a fix for error causing the reverse token button to trigger a swap confirm step, by adding 'button' type as it defaults to 'submit'.

Other changes

I've set the rate range check to ignore eXOF swaps until we decide if we need them. (If we do the range can be configured on a per pair basis)

I've also set the form values in a single function call in the reverse button as setting them sequentially caused weird quote fetching behaviour.

Tested

I didn't do all the regression test cases, but I did a good few swaps with different currencies and amounts. I did notice there is still rounding issue sometimes when using max, so I've created a issue to capture this, otherwise the quotes and swaps work as expected.

Related issues

Checklist before requesting a review

  • I have performed a self-review of my own code
  • I have added tests that prove my fix is effective or that my feature works
  • The PR title follows the conventions
  • I have run the regression tests

@vercel
Copy link

vercel bot commented Sep 22, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
mento-web ✅ Ready (Inspect) Visit Preview Sep 22, 2023 5:18am

@@ -111,7 +111,10 @@ export function SwapConfirmCard({ formValues }: Props) {
return
}
const rateBN = new BigNumber(rate)
if (rateBN.lt(MIN_EXCHANGE_RATE) || rateBN.gt(MAX_EXCHANGE_RATE)) {
if (
((toTokenId || fromTokenId) !== 'eXOF' && rateBN.lt(MIN_EXCHANGE_RATE)) ||
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Temporary fix to allow testing while we decide if we should keep this rate range check

@denviljclarke denviljclarke marked this pull request as ready for review September 22, 2023 05:50
@denviljclarke denviljclarke self-assigned this Sep 22, 2023
@denviljclarke denviljclarke merged commit 16a3e4c into main Sep 22, 2023
6 checks passed
@denviljclarke denviljclarke deleted the feat/exof_support branch September 22, 2023 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reversing selected assets triggers swap confirmation
3 participants